package aize.corp.freeconso;

import aize.corp.freeconso.R;
import android.app.Activity;
import android.graphics.Typeface;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.TextView;

public class FactureWeb extends Activity {
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.facture_web);
        
        TextView texteView = (TextView) findViewById(R.id.textViewTitle);
        Typeface font = Typeface.createFromAsset(getAssets(), "ariblk.ttf");
        texteView.setTypeface(font);  
        
        WebView webView = (WebView) findViewById(R.id.WebView);
        webView.getSettings().setBuiltInZoomControls(true);
        webView.getSettings().setUseWideViewPort(true);
        webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
        
        String data = getIntent().getStringExtra("aize.eu.freeconso.datafact");
        
        if(data!=null) {
        	data = data.replaceAll("width=\"750\"", "width=\"650\"");
        	webView.loadDataWithBaseURL("about:blank", data, "text/html", "utf-8", "about:blank");
        }
	}
	
}